class BackupVerifier:
    def verify_backup(self, backup_id):
        """备份完整性校验"""
        backup = self._get_backup(backup_id)
        
        # 1. 校验元数据
        self._verify_metadata(backup)
        
        # 2. 采样校验数据文件
        self._sample_check(backup)
        
        # 3. 日志连续性检查
        self._check_log_sequence(backup)
        
    def _verify_metadata(self, backup):
        """元数据校验"""
        expected_checksum = backup.meta_checksum
        actual_checksum = calculate_checksum(backup.meta_path)
        if expected_checksum != actual_checksum:
            raise IntegrityError("Metadata checksum mismatch")